# coding: utf-8

"""
@version: python3.6
@author: 噢啦嘿嘿
@contact: jian.zhou@360che.com
@software: PyCharm
@file: 1test_smoke.py
@time: 2021/3/22 15:38
"""
import pytest

from page.home import Home
from lib.init_data import get_data
from lib.loggers import log

base_data = get_data("base_data.yml")


@pytest.mark.usefixtures('driver')
class Test_case:

    @pytest.mark.parametrize("dian, cheak", base_data["title_cheak"])
    def test_a(self, driver, dian, cheak):
        home = Home(driver)
        home.gohome()
        home.textclick(dian)
        log.info(home.get标题("com.che.truckhome.speed:id/tv_global_title"))
        assert home.get标题("com.che.truckhome.speed:id/tv_global_title") == cheak

    def test_bbs(self, driver):
        home = Home(driver)
        home.go社区()
        home.click发帖()
        home.click帖子()
        home.input标题('test')
        home.input内容('test111111')
    #     # home.textclick('发布')
